<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class ItemFee extends Model
{
    use SoftDeletes;
    protected $guarded = ['id'];

    public function item()
    {
    	return $this->belongsTo(Item::class);
    }

    public function getReceiveStatusTxtAttribute()
    {
        return $this->receive_status?'已收':'未收';
    }

    public function getReceiveStatusStyleAttribute()
    {
        return $this->receive_status?'success':'danger';
    }

    public function getPayStatusTxtAttribute()
    {
        return $this->pay_status?'已付':'未付';
    }

    public function getPayStatusStyleAttribute()
    {
        return $this->pay_status?'success':'danger';
    }

}
